﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace DigDes.DS2012.BusinessLogic
{
    public static class DataReaderExtensions
    {
        public static TResult GetValueOrDefault<TResult>(this IDataReader reader, string columnName)
        {
            return reader[columnName] != DBNull.Value ? (TResult)reader[columnName] : default(TResult);
        }
    }
}
